<h1>Set Sample</h1>

<h2>Presentation</h2>

<b>Set Sample</b> is a sample for Android.
Its goal is to demonstrate how to create a simple View-based game for Android (not an OpenGL 3D game.)
<p/>

The source is based on a few simple principles:
<ul>
<li>It uses an MVP architecture
    (<a href="http://en.wikipedia.org/wiki/Model%E2%80%93view%E2%80%93presenter">model-view-presenter</a>.)</li>
<li>The model itself and most of the gameplay is extracted into a "model library" which is a separate java project.
    This makes it easier to run unit tests on this specific project using a simple JUnit runner without
    using an Android test-instrumentation runner.</li>
<li>The source's packages are organized using their role (model, presenter, core, ui, widgets) rather than
    their usage. This means all the activities are grouped together (for simplification, "ui" is an umbrella
    that comprises both activities and fragments) rather than having, for example, a package for the intro
    activity and another package for the game board activity, etc.</li>
</ul>

<em>Disclaimer:</em>
The game itself is a simple limited version of the known <a href="http://www.setgame.com/">Set game (www.setgame.com)</a>
and the gameplay is somewhat irrelevant here, the purpose being on programming for Android.
If all you're interested in is playing and not learning, just use one of many clones of Set available on the Play store.
Finding them is left as an exercise to the reader.
<p/>
That being said, there's a super short primer on how to play the game below (in case you want to try it anyway)
and if you run it in debug mode there's an auto-solver option in the board's overflow menu (in case you don't
really want to play it afterall.)


<h2>How to play Set</h2>

Set puzzle rules are simple: match 3 cards to form a set.
Cards can be matched on 4 criterias:
<ul>
    <li>All colors are the same <i>or</i>All colors are different.</li>
    <li>All shapes are the same <i>or</i>All shapes are different.</li>
    <li>All numbers are the same <i>or</i>All numbers are different.</li>
    <li>All shadings are the same <i>or</i>All shadings are different.</li>
</ul>

Game starts with 12 cards and displays how many sets you can potentially find.
Games have at least 4 sets possible, sometimes more. Simply tap up to 3 cards;
if you have found a set, it will be added to the list.

